<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html class="no-js">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title><?php echo ($title); ?></title>
  <meta name="description" content="这是一个 help 页面">
  <meta name="keywords" content="help">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp" /> 
  <meta name="apple-mobile-web-app-title" content="Amaze UI" />
  <link rel="stylesheet" type="text/css" href="/blog/Public/assets/css/amazeui.min.css" />
  <link rel="stylesheet" type="text/css" href="/blog/Public/assets/css/admin.css" />
  <script type="text/javascript" src="/blog/Public/assets/js/jquery.min.js"></script>
   <script type="text/javascript" src="/blog/Public/assets/js/amazeui.min.js"></script>
</head>
<body>
<header class="am-topbar am-topbar-inverse admin-header">
  <div class="am-topbar-brand">
    <strong>小草——</strong> <small>blog后台管理系统</small>
  </div>
  <button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-success am-show-sm-only" data-am-collapse="{target: '#topbar-collapse'}"><span class="am-sr-only">导航切换</span> <span class="am-icon-bars"></span></button>
  <div class="am-collapse am-topbar-collapse" id="topbar-collapse">
    <ul class="am-nav am-nav-pills am-topbar-nav am-topbar-right admin-header-list">   
    <?php if(empty($_SESSION['name'])): ?><li><a href="<?php echo U('Member/login');?>"><span class="am-icon-user"></span> 登录</a></li>
          <li><a href="<?php echo U('Member/reg');?>"><span class="am-icon-pencil"></span> 注册</a></li>  
    <?php else: ?>
     <li><a href="<?php echo U('Member/login');?>"><span class="am-icon-user"></span>  欢迎您：<?php echo (session('name')); ?></a></li>
          <li><a href="<?php echo U('Member/logout');?>"><span class="am-icon-sign-out"></span>注销</a></li><?php endif; ?>                                    
    </ul>
  </div>
</header>

<div class="am-cf admin-main">
  <!-- sidebar start -->
  <div class="admin-sidebar am-offcanvas am-dh">
    <div class="am-offcanvas-bar admin-offcanvas-bar">
      <ul class="am-list admin-sidebar-list">
       <li><a href="<?php echo U('index/view');?>"><span class="am-icon-home"></span> 博客首页</a></li>
       <li><a href="<?php echo U('Articletype/view');?>"><span class="am-icon-navicon"></span> 博客分类</a></li>
       <li><a href="<?php echo U('Article/view');?>"><span class="am-icon-file"></span> 博客文章</a></li>
       <li><a href="<?php echo U('Master/view');?>"><span class="am-icon-user"></span> 博主基本资料</a></li>
       <li><a href="<?php echo U('Photo/view');?>"><span class="am-icon-camera"></span> 博客相册</a></li> 
       <li><a href="<?php echo U('Friend/view');?>"><span class="am-icon-users"></span> 博客朋友</a></li>
       <li><a href="<?php echo U('Runtime/view');?>"><span class="am-icon-close"></span> 清理缓存</a></li>                                                   
      </ul>
       <div class="am-panel am-panel-default admin-sidebar-panel">
        <div class="am-panel-bd">
          <p><span class="am-icon-bookmark"></span> 公告</p>
          <p>时光静好，与君语；细水流年，与君同。—— 小草</p>
        </div>
      </div>

      <div class="am-panel am-panel-default admin-sidebar-panel">
        <div class="am-panel-bd">
          <p><span class="am-icon-tag"></span> wiki</p>
          <p>Welcome to the 小草 bolog!</p>
        </div>
      </div>   
    </div>
  </div>
  <!-- sidebar end -->

  <!-- content start -->
  <div class="admin-content">
  
    <div class="admin-content-body">
      <div class="am-cf am-padding am-padding-bottom-0">
        <div class="am-fl am-cf">
          <strong class="am-text-primary am-text-lg">博客文章<?php echo ($info); ?></strong> /
          <small>blogtype</small>
        </div>
      </div>
      <hr/>

     
    <link rel="stylesheet" type="text/css" href="/blog/Public/plugin/kindeditor/themes/default/default.css" />
	<link rel="stylesheet" type="text/css" href="/blog/Public/plugin/kindeditor/plugins/code/prettify.css" />
	<script type="text/javascript" src="/blog/Public/plugin/kindeditor/kindeditor-all-min.js"></script>
	<script type="text/javascript" src="/blog/Public/plugin/kindeditor/lang/zh-CN.js"></script>
	<script type="text/javascript" src="/blog/Public/plugin/kindeditor/plugins/code/prettify.js"></script>

<script>
	
		KindEditor.ready(function(K) {		
			var editor1 = K.create('textarea[name="article_content"]', {
				cssPath : '/blog/Public/plugin/kindeditor/plugins/code/prettify.css',
				uploadJson : '/blog/Public/plugin/kindeditor/php/upload_json.php',
				fileManagerJson : '/blog/Public/plugin/kindeditor/php/file_manager_json.php',
				allowFileManager : true,
				resizeType:1,
				allowImageupload:true,
				width:900,
				height:200,				
				afterCreate : function() {
					var self = this;
					K.ctrl(document, 13, function() {
						
						self.sync();
						K('form[name=info]')[0].submit();
					});
					K.ctrl(self.edit.doc, 13, function() {
						
						self.sync();
						K('form[name=info]')[0].submit();
					});
				},				
				             
			});
			prettyPrint();			
			
		});
		
	</script>

<form action="<?php echo ($url); ?>" class="am-form" method="post" name="info"  enctype="multipart/form-data" >
  <fieldset>  
   
   <div class="am-form-group">
      <label for="doc-select-1">选择博客分类</label>
      <select id="doc-select-1" name="articletype_id" id="articletype_id">
       <option value="">请选择...</option>
      <?php if(is_array($Articlelist)): $i = 0; $__LIST__ = $Articlelist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><option value="<?php echo ($vo["articletype_id"]); ?>"<?php if(($vo["articletype_id"]) == $Artinfo["articletype_id"]): ?>selected<?php endif; ?>><?php echo ($vo["articletype_name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
      </select>
      <span class="am-form-caret"></span>
    </div>
  
    <div class="am-form-group">
      <label for="article_title">文章标题：</label>
      <input type="text" class="am-input-sm" id="article_title" name="article_title" placeholder="输入标题" required value="<?php if(!empty($Artinfo["article_title"])): echo ($Artinfo["article_title"]); endif; ?>"/>
    </div>

    <div class="am-form-group">
      <label for="article_info">文章简介：</label>
      <input type="text" class="am-input-sm" name="article_info" id="article_info" placeholder="输入文章简介" required value="<?php if(!empty($Artinfo["article_info"])): echo ($Artinfo["article_info"]); endif; ?>" />
    </div>

    <div class="am-form-group">
      <label for="article_img">文章缩略图：</label>   
      <input type="file" class="am-input-sm" name="article_img" id="article_img" >
    </div>
     <div class="am-form-group">
     <?php if(!empty($Artinfo["article_img"])): ?><img src="/blog/<?php echo ($Artinfo["article_img"]); ?>"  class="am-img-thumbnail am-radius" width="60" height="40"><?php endif; ?>
    </div>

     <div class="am-form-group">
      <label>是否显示： </label>
      <label class="am-radio-inline">
        <input type="radio"  name="article_show" value="1" <?php if(($Artinfo["article_show"]) == "1"): ?>checked<?php endif; ?>  checked> 是
      </label>
      <label class="am-radio-inline">
        <input type="radio" name="article_show" value="0" <?php if(($Artinfo["article_show"]) == "0"): ?>checked<?php endif; ?> > 否
      </label>
    
    </div>
   

    <div class="am-form-group">
      <label for="doc-vld-ta-2">描述：</label>
      <textarea id="doc-vld-ta-2" name="article_content"  class="am-input-sm" minlength="10" maxlength="100"><?php if(!empty($Artinfo["article_content"])): echo ($Artinfo["article_content"]); endif; ?></textarea>
    </div>
    <input type="hidden" name="article_id" id="article_id" value="<?php if(!empty($Artinfo["article_id"])): echo ($Artinfo["article_id"]); endif; ?>"/>
    <button class="am-btn am-btn-secondary" type="submit"><?php echo ($info); ?></button>
  </fieldset>
</form>

  

   



 </div>
    <footer class="admin-content-footer">
      <hr>
      <p class="am-padding-left">© 2014 AllMobilize, Inc. Licensed under MIT license.</p>
    </footer>
  </div>
  <!-- content end -->



</div>



</body>
</html>